import React, { Component } from 'react'

import observer from '@/observer'
export default class Child4 extends Component {
  state={
    msg:''
  }
  componentDidMount(){
    observer.subscribe(arg=>{
        this.setState({msg:arg})
    })
  }
  render() {
    return (
        <div style={{flexGrow:1,background:'yellow',height:'100vh'}}>
            <h1>子组件4</h1>
            <div>{this.state.msg}</div>
        </div>
    )
  }
}
